package com.itheima.mapDemo1;

import java.util.HashMap;
import java.util.Map;

public class MapDemo3 {
    public static void main(String[] args) {
        Map<String, String> map = new HashMap<>();

        map.put("aaa1", "aaaa1");
        map.put("aaa2", "aaaa2");
        map.put("aaa3", "aaaa3");
        map.put("aaa4", "aaaa4");
        map.put("aaa5", "aaaa5");

        System.out.println("遍历方式3：Lambda表达式");

        /*
        * 遍历3：Lambda表达式
        * */
        map.forEach((key, value) -> System.out.println(key + "=" + value));
    }
}
